/**
 * Copyright(C) 2012 Luvina Software Company
 *
 * TblUserDao.java, 28/12/2012, bacdv
 */
package net.luvina.manageuser.dao;

import java.util.List;

import net.luvina.manageuser.dto.UserDetailDto;
import net.luvina.manageuser.hibernate.TblUser;

/**
 * interface TblUser in DAO
 *
 * @author bacdv
 *
 */
public interface TblUserDao extends GenericDao<TblUser, Integer> {

    /**
     * get list user in DB
     *
     * @param offset
     *            offset
     * @param limit
     *            limit
     * @param groupId
     *            group_id
     * @param fullName
     *            full_name
     * @param sortType
     *            sort_type
     * @param sortByFullName
     *            sortByFullName
     * @param sortByCodeLevel
     *            sortByCodeLevel
     * @param sortByEndDate
     *            sortByEndDate
     * @return list<UserDetailDto> list user
     */
    public List<UserDetailDto> getListUser(int offset, int limit, int groupId,
            String fullName, String sortType, String sortByFullName,
            String sortByCodeLevel, String sortByEndDate);

    /**
     * getTotalRecords
     *
     * @param userGrpId
     *            userGrpId
     * @param userName
     *            userName
     * @return Integer total records
     */
    public int getTotalRecords(int userGrpId, String userName);

    /**
     * getDetailUser
     *
     * @param userId
     *            user_Id
     * @return UserDetailDto user detail
     */
    public UserDetailDto getDetailUser(final Integer userId);

    /**
     * getUserByEmail
     *
     * @param userId
     *            userId
     * @param email
     *            email
     * @return TblUser get user
     */
    public TblUser getUserByEmail(final Integer userId, final String email);

    /**
     * checkExistedLoginName
     *
     * @param userId
     *            userId
     * @param loginName
     *            loginName
     * @return TblUser
     */
    public TblUser checkExistedLoginName(final Integer userId,
            final String loginName);

}
